package com.topisv.tms.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.ErpTMS;

public interface ErpTMSDao extends PagingAndSortingRepository<ErpTMS, Long> {

	@Query("SELECT max(erpTMS.id) FROM ErpTMS erpTMS group by topic")
	List<Long> getMaxErpTMSId();
	
	@Query("SELECT erpTMS FROM ErpTMS erpTMS where erpTMS.id=?1")
	ErpTMS getMaxErpTMS(Long id);
}
